package com.sansecy.javafx;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class JavafxSample extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        System.out.println("JavafxSample.start");
      /*
      Code for JavaFX application. 
      (Stage, scene, scene graph) 
      */

//       Group root = new Group();
//       //Retrieving the observable list object
//       ObservableList list = root.getChildren();
//
////Setting the text object as a node
//       list.add(NodeObject);
       //Creating a Stack Pane
//       StackPane pane = new StackPane();
//
////Adding text area to the pane
//       ObservableList<Node> list = pane.getChildren();
//
//       //Setting the title to Stage.
//       primaryStage.setTitle("Sample application");
//
////Setting the scene to Stage
//       primaryStage.setScene(new Scene(root));
//
////Displaying the stage
//       primaryStage.show();
//        Platform.setImplicitExit(false);
//        Platform.exit();
//        System.exit(0);

        Group root = new Group();
        Scene scene = new Scene(root, 600, 400);
        Stage stage = new Stage();
        stage.setTitle("Sample Application");
        stage.setScene(scene);
        stage.show();
    }

    public JavafxSample() {
        super();
        System.out.println("JavafxSample.JavafxSample");
    }

    @Override
    public void init() throws Exception {
        super.init();
        System.out.println("JavafxSample.init");
    }

    @Override
    public void stop() throws Exception {
        super.stop();
        System.out.println("JavafxSample.stop");
    }

    public static void main(String[] args) {
        System.out.println("JavafxSample.main");
        launch(args);
    }
} 